import { Component , OnInit } from '@angular/core';

import { Hero } from './hero';

@Component({
	  selector: 'app-root',
		//templateUrl: './app.component.html',
		template : `
			  <h1>{{title}} {{bbb()}}</h1>
				<nav>
						<a routerLink="/dashboard" routerLinkActive="active">Dashboard</a>
			  		<a routerLink="/heroes" routerLinkActive="active">Heroes</a>
				</nav>
				<router-outlet></router-outlet>
				`,
		styleUrls: ['./app.component.css'],
		providers: []
})


export class AppComponent implements OnInit {
	  title = 'Tour of heroes';
		aaa = 'bbb';
		selectedHero = '';

		bbb() :String {
				if(this.selectedHero != ''){
						return this.selectedHero + ' cuizi';
				}
				return 'cuzi';
		}

		constructor() {};
		ngOnInit(): void {};

	
		hero : Hero = {
			  name : 'windstrom',
				id : 1
		};
}
